package eclipse.lib.skill;
import javax.media.opengl.jgloo.jglfx.JGLParticle;

import eclipse.lib.*;
/*
 * Copyright (c) 2009, TOD Productions All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 *	- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 *	- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 *	-Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 */
public class Skill extends Equipable implements Cloneable
{
	private static int skillCount;
	private int index;
	private int castTime;
	private int mpCost;
	private int spCost;
	private int animation;
	private int range;
	private float mastery;
	private Attribute attribute;
	private Element	element;
	private String name;
	private String sound;
	private JGLParticle particles[];
	public Skill()
	{
		setIndex(skillCount);
		skillCount++;
	}
	public Skill(int particleCount)
	{
		setIndex(skillCount);
		skillCount++;
		setParticles(new JGLParticle[particleCount]);
	}
	public final void setParticleCount(int particles)
	{
		this.particles = new JGLParticle[particles];
	}
	public final void setMpCost(int mpCost) {
		this.mpCost = mpCost;
	}
	public final int getMpCost() {
		return mpCost;
	}
	public final void setCastTime(int castTime) {
		this.castTime = castTime;
	}
	public final int getCastTime() {
		return castTime;
	}
	public final void setSpCost(int spCost) {
		this.spCost = spCost;
	}
	public final int getSpCost() {
		return spCost;
	}
	public final void setSound(String sound) {
		this.sound = sound;
	}
	public final String getSound() {
		return sound;
	}
	public final void setName(String name) {
		this.name = name;
	}
	public final String getName() {
		return name;
	}
	public final void setAttribute(Attribute attribute) {
		this.attribute = attribute;
	}
	public final Attribute getAttribute() {
		return attribute;
	}
	public final void setParticles(JGLParticle particles[]) {
		this.particles = particles;
	}
	public final JGLParticle[] getParticles() {
		return particles;
	}
	public final void setIndex(int index) {
		this.index = index;
	}
	public final int getIndex() {
		return index;
	}
	public final void setAnimation(int animation) {
		this.animation = animation;
	}
	public final int getAnimation() {
		return animation;
	}
	public final void setRange(int range) {
		this.range = range;
	}
	public final int getRange() {
		return range;
	}
	public final void setElement(Element element) {
		this.element = element;
	}
	public final Element getElement() {
		return element;
	}
	public final void setMastery(float mastery) {
		this.mastery = mastery;
	}
	public final float getMastery() {
		return mastery;
	}
	public final Skill clone()
	{
		try
        {
			return (Skill)super.clone();
		}
        catch (CloneNotSupportedException e) 
        {
			eclipse.ErrorManager.handleError(e);
		}
		return null;
	}
}
